"""请将下面的json对象保存到文件,并再次读取，后将spc字段值改成"喷火"

"""

import json


myjson = {"name": "汤姆", "city": "火城", "age": 6, "spc": None}

with open("ctqin.json", "w", encoding="utf-8") as w:
    json.dump(myjson, w, ensure_ascii=False)


with open("ctqin.json", "r", encoding='utf-8') as r:
    content = json.load(r)
    content["spc"] = "喷火"
    print(content)